package cn.outmaneuver.outman.demo.web.controller;
/**
 * Copyright 2023-2023 by dym. All Rights Reserved.
 */

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.MessageSource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Locale;

/**
 * I18nDemoController
 * <p> </p>
 *
 * @author dym
 * @date 2023/11/17
 * @version 1.0
 */
@RestController
@RequestMapping("/demo/i18n")
public class I18nDemoController {

    @Autowired
    private MessageSource messageSource;
    @RequestMapping("/getMessage")
    public String getMessage(){
        return messageSource.getMessage("A100",null,Locale.getDefault());
    }
}
